package com.cy.service.impl;

import com.cy.common.pojo.Node;
import com.cy.dao.SysMenuDao;
import com.cy.pojo.SysMenu;
import com.cy.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysMenuServiceImpl implements SysMenuService {
    @Autowired
    private SysMenuDao sysMenuDao;

    @Override
    public List<SysMenu> selectMenu() {
        return sysMenuDao.selectMenu();
    }

    @Override
    public List<Node> selectMenuTreeNodes() {
        return sysMenuDao.selectMenuTreeNodes();
    }

    @Override
    public SysMenu selectById(Integer id) {
        return sysMenuDao.selectById(id);
    }

    @Override
    public int insertMenu(SysMenu menu) {
        return sysMenuDao.insertMenu(menu);
    }

    @Override
    public int updateMenu(SysMenu menu) {
        return sysMenuDao.updateMenu(menu);
    }
}
